import QtQuick 1.1
import com.nokia.symbian 1.1
import com.symbian.gui.extras.community 1.0

Page {
    id: dialogsPage
    tools: toolBarLayout

    Column {
        anchors.fill: parent
        anchors.margins: platformStyle.paddingMedium
        spacing: 10

        ToolButton{
            width : 300
            anchors.horizontalCenter: parent.horizontalCenter
            text: qsTr( "Change password dialog" )
            onClicked: dlgChangePwd.launch()
        }

        DayOfWeekTimeSelector {
            width : 300
            anchors.horizontalCenter: parent.horizontalCenter
            curDay: Qt.Monday
            curHour: 12
            curMinute: 0
        }
    }

    ChangePasswordDialog {
        id: dlgChangePwd

        minNumberOfCharacters: 3
        onAccepted: console.log( "New password: " + dlgChangePwd.password )

        function advancedCheck( pwd )
        {
            // just for fun
            return pwd === "123" ? qsTr( "Password is too simple!" ) : ""
        }
    }
}
